﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using CommunitySystem.Assert;
using CommunitySystem.Ctrls;
using CommunitySystem.Views;

namespace CommunitySystem
{
    public partial class DengLuRenYuanChaXunControl : AsyncCtrl, IReturnListenerc
    {
        #region IReturnListenerc 成员
        public void BeginReturn()
        {
            
        }
        #endregion
        public NavMoveSwitch Nav { get; set; }
        private PublicOfficialSelectionService.PublicOfficialSelectionServiceClient Client1 =
            new PublicOfficialSelectionService.PublicOfficialSelectionServiceClient();
        public DengLuRenYuanChaXunControl(int exameid,string dangtian)
        {
            InitializeComponent();
            Client1.GetDengLuRenCompleted -= new EventHandler<PublicOfficialSelectionService.GetDengLuRenCompletedEventArgs>(Client1_GetDengLuRenCompleted);
            Client1.GetDengLuRenCompleted += new EventHandler<PublicOfficialSelectionService.GetDengLuRenCompletedEventArgs>(Client1_GetDengLuRenCompleted);
            Client1.GetDengLuRenAsync(exameid, dangtian);
        }

        void Client1_GetDengLuRenCompleted(object sender, PublicOfficialSelectionService.GetDengLuRenCompletedEventArgs e)
        {
            DGRole.ItemsSource = null;
            DGRole.ItemsSource = e.Result;
        }
    }
}
